<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>
<body>


    <script>
        function foo (num) {
            var sum = 1 ;
            // console.log("第"+num-(num-1)+"次代码");
            for(var i = num ;  i >1 ; i --) {
                sum *=i ;
                console.log(sum);
            }

        }
        foo(10);
    </script>
</body>
</html>